package com.awesome.blog.service;

import com.awesome.blog.dao.ArticleMapper;
import com.awesome.blog.entity.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ArticleServiceImpl implements ArticleService {
    @Autowired
    public ArticleMapper articleMapper;
    public List<Article> selectByType(String type) {
        return articleMapper.selectByType(type);
    }

    public List<Article> selectByCate(String cate) {
        return articleMapper.selectByCate(cate);
    }
    public List<Article> selectByTime(String time) {
        return articleMapper.selectByTime(time);
    }

    public List<Article> selectBySearch(String search) {
        return articleMapper.selectBySearch(search);
    }
    public Article selectById(Integer id) {
        return articleMapper.selectById(id);
    }
}
